|
Posizione nel menu |
---|
Mesh → Scala... |
Ambiente |
Mesh |
Avvio veloce |
Nessuno |
Introdotto nella versione |
- |
Vedere anche |
Nessuno |
Il comando Scala scala gli oggetti mesh.
0
.
Vedere anche: Script di base per FreeCAD
Per scalare una mesh usare il suo metodo transformGeometry
.
import FreeCAD as App
import Mesh
# Create a non-parametric box-shaped mesh:
msh = App.ActiveDocument.addObject("Mesh::Feature", "Mesh")
msh.Mesh = Mesh.createBox(10, 10, 10)
msh.ViewObject.DisplayMode = "Flat Lines"
# Create and scale a matrix:
mat = App.Matrix()
mat.scale(2.0, 3.0, 4.0) # Unequal scaling.
# We need to work on a copy of the msh.Mesh object:
new_msh = msh.Mesh.copy()
# Transform that copy:
new_msh.transformGeometry(mat)
# Update msh.Mesh:
msh.Mesh = new_msh